﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using Kele.Activity.Helper;
using Newtonsoft.Json;

namespace Kele.Activity.Models
{
    /// <summary>
    /// 商家
    /// </summary>
    public class Merchant
    {
        public int id { get; set; }

        /// <summary>
        /// 代理ID
        /// </summary>
        public int agent_id { get; set; }
        /// <summary>
        /// 只有在用户将公众号绑定到微信开放平台帐号后，才会出现该字段
        /// </summary>
        public string unionid { get; set; }

        /// <summary>
        /// 用户的唯一标识
        /// </summary>
        public string openid { get; set; }

        /// <summary>
        /// 登录账号，手机号码
        /// </summary>
        public string mobile { get; set; }

        /// <summary>
        /// 商家名称
        /// </summary>
        public string name { get; set; }

        /// <summary>
        /// 头像
        /// </summary>
        public string avatar { get; set; }

        /// <summary>
        /// 主页封面
        /// </summary>
        public string cover { get; set; }

        /// <summary>
        /// 账户ID
        /// </summary>
        public int account_id { get; set; }

        /// <summary>
        /// 账户类型，0=默认账户(default)、1=主账户(primary)、2=子账户(sub)
        /// </summary>
        public int account_type { get; set; }

        /// <summary>
        /// 身份认证，0=未认证(unidentified)、1=个人认证(personal)、2=企业认证(corporation)
        /// </summary>
        public int identify_type { get; set; }

        /// <summary>
        /// 会员类型，1=基础会员、2=旗舰会员
        /// </summary>
        public int vip_type { get; set; }

        /// <summary>
        /// 商户行业
        /// </summary>
        public int category_id { get; set; }

        /// <summary>
        /// 用户个人资料填写的省份
        /// </summary>
        public string area_code { get; set; }


        [DefaultValue("[]")]
        [JsonConverter(typeof(StringJsonConverter))]
        public string tags { get; set; }

        /// <summary>
        /// 会员到期时间
        /// </summary>
        public DateTime valid_end_time { get; set; }


        [JsonIgnore]
        public DateTime created { get; set; }

        [JsonIgnore]
        public DateTime modified { get; set; }
        public List<MerchantStore> stores { get; set; }


    }
}